package main

import "fmt"

func main() {
	sourArr := []int{1, 4, 9, 16, 2, 5, 10, 15}
	finArr := []int{}
	for i := 0; i < len(sourArr)-1; i++ {
		finArr = append(finArr, sourArr[i]+sourArr[i+1])
	}

	fmt.Println(finArr)
}
